#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int a = 7;
	double xn = 2.00;
	double temp = 0;
	while (1)
	{
		temp = xn;
		xn = 0.5 * (xn + a / xn);
		if (abs(xn - temp) < pow(10, -5))
		{
			break;
		}
	}
	printf("xn = %lf\n", xn);
	return 0;
}